-- GENERATED SPELL FOR [Aspect of Shadow] --


function spell0_14521(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15472,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14521', 3000, 1)
end

function spell1_14521(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(17228,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14521', 583, 1)
end

function spell2_14521(pUnit, Event) --@Shadow Shield,n/a--
pUnit:FullCastSpellOnTarget(22417,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14521', 30298, 1)
end

function spell3_14521(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17289,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14521', 558, 1)
end

function Sorts_14521(pUnit, Event)
local choix_sorts_14521 = math.random(0, 3)
if choix_sorts_14521 == 0 then
pUnit:RegisterEvent('spell0_14521', 1, 1)
end
if choix_sorts_14521 == 1 then
pUnit:RegisterEvent('spell1_14521', 1, 1)
end
if choix_sorts_14521 == 2 then
pUnit:RegisterEvent('spell2_14521', 1, 1)
end
if choix_sorts_14521 == 3 then
pUnit:RegisterEvent('spell3_14521', 1, 1)
end
end

function mob14521_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14521', math.random(1500, 3000), 1)
end

function mob14521_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14521_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14521_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14521, 1, 'mob14521_Action')
RegisterUnitEvent(14521, 2, 'mob14521_Leave')
RegisterUnitEvent(14521, 3, 'mob14521_Kill')
RegisterUnitEvent(14521, 4, 'mob14521_Die')
